An automatic programming device receives machining-area data on performing partial machining. The machining data includes data regarding the shape of the machining area, the machining method, the cutting tool to be used, and the machining conditions. The automatic programming device then generates control-command information for operating a machine tool according to the input machining-area data. In the automatic programming device, chamfering is machining mainly performed to remove a corner portion of a boundary where adjacent surfaces intersect with each other. If chamfering is applied to a curved surface, the boundary of the curved surfaces is the machining target, and thus the shape of the chamfered portion becomes complicated. Due to this complexity, chamfering is generally performed by a 5-axis control machine and the like (see, for example, Patent Literature 1).
With chamfering, it is sufficient to remove corner portions, and thus high accuracy is not required thereof. Chamfering methods vary according to the part to be chamfered or depending on the material, and thus instruction methods for chamfering also differ accordingly.